package BehavioralMode.state.elevator.elevatorState;

import BehavioralMode.state.elevator.Context;
import BehavioralMode.state.elevator.ElevatorState;

public class CloseState extends ElevatorState {
    @Override
    public void open() {
        super.context.setElevatorState(Context.openState);
        super.context.getElevatorState().open();
    }

    @Override
    public void close() {
        System.out.println("关闭电梯");
    }

    @Override
    public void run() {
         super.context.setElevatorState(Context.runState);
         super.context.getElevatorState().run();
    }

    @Override
    public void stop() {
         super.context.setElevatorState(Context.stopState);
         super.context.getElevatorState().stop();
    }
}
